const bedonce = (fun, deary = 1000) => {
    if (window.time) {
        clearTimeout(window.time)
    }
    window.time = setTimeout(() => {
        fun()
    }, deary)
}

export default bedonce
